import request from '../utils/request';
import {FT_URI} from "./base";

// {
//   "pageNum": 1,
//   "pageSize": 10,
//   "name": "",
//   "id": 0,
//   "code": "",
//   "msgType": 0,
//   "msg": "",
//   "theme": "",
//   "beginTime": "",
//   "endTime": "",
//   "userId": 0
// }
export function getMessageList(data: any) {
  return request({
    url: `${FT_URI}/business/Message/page`,
    method: 'get',
    params: data
  });
}

export function addMessageList(data: any) {
  return request({
    url: `${FT_URI}/business/Message/add`,
    method: 'post',
    data: data
  });
}

export function updateMessage(data: any) {
  return request({
    url: `${FT_URI}/business/Message/update`,
    method: 'put',
    data: data
  });
}

export function getMessageDetail(id: any) {
  return request({
    url: `${FT_URI}/business/Message/getOne/${id}`,
    method: 'get'
  });
}

export function deleteMessage(id: any) {
  return request({
    url: `${FT_URI}/business/Message/delete/${id}`,
    method: 'delete'
  });
}